from PySide6.QtCore import QThread

class GenericWorker(QThread):
    def __init__(self,task):
        super().__init__()
        self.task = task

    def run(self):
        self.task()